
package cc.software.books.format;

public class PluginPdb
{
   public final static int PDB_TEXTSIZE =  4;
   
   public int handle = 0;
   
   public int open(String name){
          handle = book_open(name); 
          return handle;
          };

   public String getData(String enc){
	   Param param = new Param();
       param.str =enc;
	   int ret = book_get(handle,PDB_TEXTSIZE,param);
	   return param.str;
   }
   
   public void close(){
          book_close(handle);
          };

   //--------------------------------------------------------------------- native api
   public native int book_open(String name);
   public native int book_get(int handle,int prop,Param param);
   public native void book_close(int f);
   
   static {
	System.loadLibrary("pdb");
   };
};
